/**
 * 鍖椾含閽夊浘浜掑姩绉戞妧 all right reserver
 */
package com.sincebest.fivestar.swagger;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author Wangyi
 * @since 2017
 */
@Configuration
@EnableSwagger2
public class DocketConfiguration {

	@Bean
	public Docket startApiDocket() {
		return new Docket(DocumentationType.SWAGGER_2).groupName("robot").apiInfo(apiInfo()).select().build();
	}

	private ApiInfo apiInfo() {
		return new ApiInfoBuilder().title("机器人API").description("1.机器人接口").termsOfServiceUrl("http://www.dingsns.com")
				.version("1.0").build();
	}
}
